import java.util.Scanner;
public class PasswordSc1 {
    public static void main(String[] args) {
        int count = 3;
        Scanner sc = new Scanner(System.in);
        while(count != 0) {
            System.out.println("请输入你的密码：");
            String a = sc.nextLine();
            if(a.equals("123456")) {
                System.out.println("登录成功！");
                return;
            }else {
                count--;
                System.out.println("你还剩"+count+"次机会！");
            }
        }
    }
}
